<template>
  <h1>事件绑定练习</h1>
  <!-- 下面两种点击事件的效果一样 -->
  <button @click="f()">按钮1</button>
  <button v-on:click="f()">按钮2</button>

  <h3>回车按下事件</h3>
  <input type="text" @keydown.enter="ent()">
</template>

<script setup>
  const f = ()=>{
    console.log('点击了！');
  }
  const ent = ()=>{
    //console.log('敲回车啦!');
    alert('登录成功!');
  }
</script>

<style scoped>

</style>